package cn.zc.controller;

import cn.zc.entity.UserInfo;
import cn.zc.result.R;
import cn.zc.service.UserInfoService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserInfoController {
    @Resource
    private UserInfoService userInfoService;
    @GetMapping(value = "/api/users")
    public R users(){
        List<UserInfo> list = userInfoService.list();
        return R.success(list);
    }
}
